package com.ysd.lis.controller.sys;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.SysFlowNode;
import com.ysd.lis.request.SysFlowParam;
import com.ysd.lis.service.SysFlowNodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 员工表
 * 前端控制器
 * </p>
 *
 * @author prs
 * @since 2024-04-01
 */
@Api(tags = "流程节点")
@RestController
@RequestMapping("/api/sys/flowNode")
public class SysFlowNodeController extends BaseController {

    @Autowired
    SysFlowNodeService sysFlowNodeService;

    @ApiOperation("查询")
    @GetMapping("/findNodeList")
    public Result findNodeList(SysFlowParam param){
        return sysFlowNodeService.findNodeList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addNode")
    public Result addNode(@RequestBody SysFlowNode node){
        return  sysFlowNodeService.addNode(node);
    }

    @ApiOperation("修改")
    @PostMapping("/editNode")
    public Result editNode(@RequestBody SysFlowNode node) {
        return sysFlowNodeService.editNode(node);
    }

    @ApiOperation("根据详情id删除详情数据")
    @PostMapping("/deleteNode")
    public Result deleteNode(@RequestBody SysFlowNode node) {
        return sysFlowNodeService.deleteNode(node);
    }
}
